Skip to content

Conversation

AdnaanA
Copy link

@AdnaanA AdnaanA commented Sep 25, 2025

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

completed sprint2 coursework by answering the questions within the tasks fixing the codes and creating functions and testing for functionality.

@AdnaanA AdnaanA added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 25, 2025
Copy link

Your PR couldn't be matched to an assignment in this module.

Please check its title is in the correct format, and that you only have one PR per assignment.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@AdnaanA AdnaanA added the 📅 Sprint 2 Assigned during Sprint 2 of this module label Sep 25, 2025
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Oct 6, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start on this sprint's tasks, I have spotted a few areas where you could improve code further

return bmi;
}

console.log(calculateBMI(weight, height).toFixed(1)); // should return 26.7

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BMI calculation has to be to 1 decimal place, according to the specification. You're fixing the position in your log, after the function returns. Is that the best way to implement this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best practice is letting the function return the BMI formatted to 1 decimal place, rather than having it fixed in the log.



function toPounds(penceString) {
const penceStringWithoutTrailingP = penceString.substring(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor issue - I would recommend adding indentation within functions so we can more easily see when we are inside and outside a function

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback indentation is now fixed.

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 6, 2025
@AdnaanA AdnaanA added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 6, 2025
@LonMcGregor
Copy link

Great, thanks for changing this. You are have now completed this task

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants